Many businesses are providing access to their products and services through applications that are delivered over computer networks such as the Internet. These applications typically have a multi-tiered architecture. In those cases where the applications are delivered over the Internet they are commonly referred to as Web applications. FIG. 1 is a block diagram of a Web application 100 having a multi-tiered architecture.
Web application 100 includes client layer 110, application layer 120, and database layer 130. Client layer 110 includes user interface 112 that runs on a client computing device such as a desktop computer, a laptop computer, a personal digital assistant, a telephone, and the like. In a Web-based environment, user interface 112 is typically a Web browser. User interface 112 may collect input from a user and provide that input to application layer 120 for processing.
Application layer 120 includes application server 122 to receive and process input from client layer 110. Application server 122 typically includes a number of subcomponents including, for example, connectivity layer 140, presentation logic 142, business logic 144, and database interface 146. Connectivity layer 140 provides connections to client layer 110 using protocols such as the HyperText Transfer Protocol (HTTP). The HTTP protocol refers to any of the HTTP protocols including, for example, the protocol described in Request For Comments (RFC) 2616 entitled, “HyperText Transport Protocol—HTTP/1.1,” June 1999 (hereinafter, the HTTP protocol). Presentation logic 142 generates a Graphical User Interface (GUI) using, for example, a markup language such as the Hyper Text Markup Language (HTML). Business logic 144 represents the core of the application, for example, the rules governing the underlying business process (or other functionality) provided by the application. Database interface layer 146 provides an interface to database layer 130. The Java 2 Enterprise Edition Specification v1.3, published on Jul. 27, 2001 (the J2EE Standard) defines an increasingly popular architecture for application layer 120.
Database layer 130 includes data access logic used by business logic 144 to store and retrieve data in database 132. Database 132 provides non-volatile storage (sometimes referred to as a persistent store) for the data accessed and/or processed by application layer 120. Database 132 may be, for example, a relational database or an object-oriented database.
Web application 100 provides one example of the widespread use and importance of graphical user interfaces (GUIs) in modern computer software. GUIs are, in fact, a nearly ubiquitous means for a user to interact with software. Typically, the user provides events such pointing device movements, object manipulation, menu selection, and the opening and closing of windows. In response, the GUI interacts with the underlying software through messages and/or method calls. The complexity of GUIs has been increasing as the use of GUIs has increased.
The testing of GUIs, however, has not kept pace with the growth in the use and complexity of GUIs. The testing of a GUI typically involves comparing the actual state of the GUI to a target state for the GUI. Conventional GUI testing systems often perform a bitwise comparison between the actual state of the GUI and the target state of the GUI. If the actual state is exactly the same as the target state, then the system can determine that the GUI is valid. Otherwise, a human must decide whether small differences between the actual state and the target state should be allowed.
In practice, there can be many valid reasons for a relatively small difference between the actual state of the GUI and its target state. For example, many GUIs display information that is constantly changing such as times, dates, market valuations, displacement of moving objects, counts, and the like. In addition, variations in the placement and color of objects are often acceptable. The costs associated with testing a GUI increase dramatically when a human is required to make decisions on a case-by-case basis. In addition, the use of human labor to test the validity of GUIs also introduces human error into the testing process.